package com.supeng.PMdepot.adapter;

import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.supeng.PMdepot.R;
import com.supeng.PMdepot.entity.PaiGongBeen;

/**
 * 入库
 * Created by Supeng on 2018/8/23.
 */
//Caption been
public class PaiGongDanAdapter extends BaseQuickAdapter<PaiGongBeen, BaseViewHolder> {

    public PaiGongDanAdapter() {
        //item layout
        super(R.layout.layout_paigong_item);
    }
    //设置控件数据
    @Override
    protected void convert(final BaseViewHolder helper, PaiGongBeen item) {
        helper.setText(R.id.tv_chanpintiaoma, "派工单号:" + item.getGongdan());
        helper.setText(R.id.tv_chanpingname,"产品条码:"+item.getCptiaoma());
        helper.setText(R.id.tv_chanpincount,"产品名称:"+item.getChanpin());
        TextView tvCpname=helper.getView(R.id.tv_chanpincount);
        tvCpname.setMovementMethod(ScrollingMovementMethod.getInstance());
        tvCpname.setHorizontallyScrolling(true);
        helper.setText(R.id.tv_cangkutiaoma,"领取数量:"+item.getShuliang());

    }
}
